<template>
  <div class="sideNav">
      <div class="img">
        <img src="../../assets/img/logo_index.png" alt="">
      </div>
    <el-col class="menu" :span="24">
    <el-menu
      default-active="1"
      class="el-menu-vertical-demo"
      @open="handleOpen"
      @close="handleClose"
      background-color="#353b4e"
      text-color="#ccc"
      active-text-color="#409eff">
      <router-link tag="el-menu-item" to="/home" index="1">
      首页
      </router-link>
      <el-submenu index="2">
         <template slot="title">内容管理</template>
         <router-link tag="el-menu-item" index="2-1" to="/content/publish">发布文章</router-link>
         <router-link tag="el-menu-item" index="2-2" to="/content/articles">内容列表</router-link>
         <router-link tag="el-menu-item" index="2-3" to="/content/comment">评论管理</router-link>
         <router-link tag="el-menu-item" index="2-4" to="/content/material">素材管理</router-link>
      </el-submenu>
      <el-submenu index="3" >
        <template slot="title">粉丝管理</template>
        <el-menu-item index="3-1">图文数据</el-menu-item>
        <el-menu-item index="3-2">粉丝概况</el-menu-item>
        <el-menu-item index="3-3">粉丝画像</el-menu-item>
        <el-menu-item index="3-4">粉丝列表</el-menu-item>
      </el-submenu>
      <el-menu-item index="4">
        <span slot="title">账户信息</span>
      </el-menu-item>
    </el-menu>
  </el-col>
  </div>
</template>

<script>
export default {
  methods: {
    handleOpen (key, keyPath) {
      console.log(key, keyPath)
    },
    handleClose (key, keyPath) {
      console.log(key, keyPath)
    }
  }
}
</script>

<style lang="less">
.sideNav{
    overflow: hidden;
    background-color: #353b4e;
    height: 100vh;
    .img{
    display: flex;
    justify-content: center;
    align-items: center;
    height: 80px;
    background-color: #000;
    img{
        height: 50%;
        width: 50%;
      }
    }
   .el-menu-vertical-demo{
     border: none;
   }
}
</style>
